
USE [AnotherSuccessfulProcedure]

IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[LogFilesSelectByLeagueId]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
	DROP PROCEDURE dbo.LogFilesSelectByLeagueId
END


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		Neil Wilson
-- Create date: 11/03/2008
-- Description:	Gets a log file record by League id
-- =============================================
CREATE PROCEDURE LogFilesSelectByLeagueId 

	@LeagueId int

AS
BEGIN

	SET NOCOUNT ON;

	SELECT [LogId]
		  ,[LogName]
		  ,[LogFileName]
		  ,[LogLocation]
		  ,[DateTime]
		  ,[MapId]
		  ,[RedFinalScore]
		  ,[BlueFinalScore]
		  ,[MatchStartTime]
		  ,[MatchEndTime]
		  ,[TotalMatchLength]
		  ,[LeagueId]

	FROM
		[AnotherSuccessfulProcedure].[dbo].[LogFiles]
	WHERE
		[LeagueId] = @LeagueId
END
GO

--   LogFilesSelectByLeagueId 2

